package com.qf.service.impl;


import com.qf.dao.GoodsTypeDao;
import com.qf.dao.impl.GoodsTypeDaoImpl;
import com.qf.pojo.TbGoodsType;
import com.qf.service.GoodsTypeService;

import java.util.List;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/8/16 16:51
 */
public class GoodsTypeServiceImpl implements GoodsTypeService {
    private GoodsTypeDao goodsDao=new GoodsTypeDaoImpl();
    @Override
    public List<TbGoodsType> findALL(int level) {

        return goodsDao.selectAll(level);
    }

    @Override
    public TbGoodsType selectById(long typeid) {
        return goodsDao.selectById(typeid);
    }

    @Override
    public List<TbGoodsType> find() {
        return goodsDao.selectAllGt();
    }

    @Override
    public void addGoodsType(String name) {
        goodsDao.insertGoodsType(name);
    }
}
